package top.lilele.adminSystem.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author lilele
 */
@TableName(value = "admin_daily")
@Data
public class AdminDailyEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 填写日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "填写日期不能为空")
    @TableField(value = "fillDate")
    private Date fillDate;

    /**
     * 填写内容
     */
    @NotEmpty(message = "填写内容不能为空")
    @TableField(value = "content")
    private String content;

    @NotEmpty(message = "项目不能为空")
    @TableField(value = "projectNames")
    private String projectNames;

    /**
     * 创建人id
     */
    @TableField(value = "createdId")
    private String createdId;

    /**
     * 更新人id
     */
    @TableField(value = "updatedId")
    private String updatedId;

    @TableField(value = "createdTime", fill = FieldFill.INSERT)
    private Date createdTime;
    @TableField(value = "updatedTime", fill = FieldFill.UPDATE)
    private Date updatedTime;
}
